{extend name="layout/layout" /}


{block name="style"}
	<style>
		header.mui-bar{
			background: #0EC7FD;
		}

		.qrcode{
			background: #4253EB;
			position: relative;
		}

		.code{
			position: absolute;
			top:28.5%;
			left: 25%;
			width: 50%;
			height: 31%;
		}
	</style>
{/block}

{block name="main"}
	<div class="qrcode" v-cloak>
		<img src="/assets/mobile/images/qrcode_bg.png" alt="" class="img-responsive">
		<img :src="codeUrl" alt="" class="code">
	</div>
{/block}
{block name="navbar"}{/block}
{block name="script"}
	<script>
		var myVue = new Vue({
			el:'.qrcode',
			data:{
				codeUrl: 'http://qr.liantu.com/api.php?text=http://www.zhshop.net/mobile/user/register/rmobile/{$data.mobile}/merid/'+merid
			},
			mounted: function(){
				if(token){
					this.token = token;
					console.log(this.token);
				} else {
					this.login();
				}

			},
			methods: {
				login:function(){
					location.href = '/mobile/user/login';
				},
			}
		});
	</script>
{/block}